<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>我的文章</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <!--<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">-->
    <link rel="stylesheet" href="__STATIC__/style/weui.min.css">
    <link rel="stylesheet" href="__STATIC__/style/cmgd.css">
    <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <!--奥森图标-->
    <link rel="stylesheet" href="__STATIC__/style/FontAwesome_4.2.0/css/font-awesome.min.css">
    <style>
        .text{padding-left:9px; }
        .fa-list-ul{padding-right:3px;}
        .weui-media-box__desc img{width:22px;height:22px;}
        .weui-navbar{top:5px;}
        .weui-navbar+.weui-tab__panel{
            padding-top: 62px;
            padding-bottom: 60px;
        }
    </style>
</head>
<body>

<div class="container" id="container">

    <!--顶部搜索-->
    <div class="page home js_show">

        <div class="page__bd" style="height: 100%;">
            <!--选择导航-->
            <div class="weui-tab" id="navbar">

                <div class="weui-navbar">
                    {foreach name="articles" item="val"}
                    <div class="weui-navbar__item {eq name="val.selected" value="1"}weui-bar__item_on{/eq}" id="{$val.cate_id}" >{$val.name}</div>
                {/foreach}

            </div>

            <div class="weui-tab__panel">

                {foreach name="articles" item="val"}
                <div id="wz{$val.cate_id}" class="wenzhang " style='{eq name="val.selected" value="1"}display:block;{else/}display:none;{/eq}' >
                    <div class="weui-panel articlelist">
                        <div class="page__bd" >
                            <div class="weui-panel weui-panel_access">
                                <div class="weui-panel__hd" style="font-size:16px;color: #000;"><i class="fa fa-list-ul"></i>{$val.name}</div>
                                <div class="weui-panel__bd">
                                    {foreach name="val.article_list" item="article"}
                                    <a href="{:url('index/article_detail',array('id'=>$article.id))}" class="weui-media-box weui-media-box_appmsg">
                                        <div class="weui-media-box__hd">
                                            <img class="weui-media-box__thumb" src="/uploads/images/{$article.photo}" height="100%" alt="">
                                        </div>
                                        <div class="weui-media-box__bd">
                                            <h4 class="weui-media-box__title">{$article.title}</h4>
                                            <p class="weui-media-box__desc" > {$nickname}&nbsp;&nbsp;&nbsp;&nbsp; {$article.create_time}</p>
                                        </div>
                                    </a>
                                    {/foreach}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                {/foreach}


            </div>
        </div>
    </div>
</div>


</div>
</body>

<script type="text/javascript">
    //        顶部搜索
    $("#zhengwen").hide();
    $("#huati").hide();

    //顶部导航
    $(function(){
        $('.weui-navbar__item').on('click', function () {

            var id =$(this).attr('id');

            $(this).addClass('weui-bar__item_on').siblings('.weui-bar__item_on').removeClass('weui-bar__item_on');

            newid ='#wz'+ id;

            $('.wenzhang ').hide();
            $(newid).show();





        });
    });
    //底部导航
    $(function(){
        $('.weui-tabbar__item').on('click', function () {
            $(this).addClass('weui-bar__item_on').siblings('.weui-bar__item_on').removeClass('weui-bar__item_on');
        });
    });


</script>

</html>